//
//  MineListCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/8/28.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "MineListCell.h"


@implementation MineListCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        _iv = [UIImageView new];
        _iv.layer.backgroundColor = ColorClear.CGColor;
        _iv.layer.cornerRadius = 4;
        [self addSubview:_iv];
        [_iv mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self).offset(10);
            make.left.equalTo(self).offset(10);
            make.width.equalTo(@22);
            make.height.equalTo(@22);
        }];
        
        _label = [UILabel new];
        _label.text = @"商务合作";
        _label.textColor = ColorFrom16(0x333333);
        _label.font = PFRFONT(14);
        [self addSubview:_label];
        [_label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.left.equalTo(_iv.mas_right).offset(10);
            make.width.equalTo(@94);
            make.height.equalTo(@20);
        }];
        
        _cacheLabel = [UILabel new];
        _cacheLabel.text = @"";
        _cacheLabel.font = PFRFONT(12);
        _cacheLabel.textColor = ColorFrom16(0x666666);
        _cacheLabel.textAlignment = 2;
        _cacheLabel.hidden = YES;
        [self addSubview:_cacheLabel];
        [_cacheLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.mas_centerY);
            make.right.equalTo(self).offset(-12.5);
            make.width.greaterThanOrEqualTo(@20);
            make.height.equalTo(@17);
        }];
        
        UIView *line = [UIView new];
        line.backgroundColor = COLOR_BACKGROUND;
        [self addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self);
            make.left.and.right.equalTo(self);
            make.height.equalTo(@1);
        }];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
